import GLOBAL_FUN from './api/global_function.js'

export default function permission(router) {
    router.beforeEach(async (to, from, next) => {
        // 检查外部跳转携带的token信息 
        if (to.query.Authorization) {
            GLOBAL_FUN.setToken(to.query.Authorization)
        }
        next()
    })
}